chore: introduce support for NPM_DEPLOY config for MFEs wrt uploading JS source maps to Datadog #4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
datadog-ci
command, installed via the@datadog/datadog-ci
NPM package appears to be missing in the current implementation of theFrontendDeployer
on a recent test of the stage deployment pipeline:This issue is likely due to the
@datadog/datadog-ci
NPM package only getting installed duringFrontendBuilder
, such that whenFrontendDeployer
is run, the previously installed NPM package exposing thedatadog-ci
command is no longer installed since it's a separate environment from theFrontendBuilder
.Given this issue, this PR proposes setting a
NPM_DEPLOY
config setting in edx-internal's common MFE configuration, defining NPM packages to be installed for the purpose of deployment. For now, this would only be@datadog/datadog-ci
, but could be expanded for future use cases as well.The alternative considered was having
FrontendBuilder
install the@datadog/datadog-ci
NPM package directly (hardcoded inedx/tubular
). However, this approach was decided against in favor of the more generalizedNPM_DEPLOY
defined via edx-internal's common MFE configuration instead, for parity withNPM_PRIVATE
andNPM_ALIASES
.NPM_PRIVATE
are private packages that the build application relies on; similarly,NPM_ALIASES
are installed packages that are aliased via package.json definitions.NPM_DEPLOY
differs because the packages listed here are not relevant to the built application; only in support of the deployment.Related PRs: